import request from '@/utils/request'
import request2 from '@/utils/request2'

// 查询合同台账列表
export function listContractInfo(query) {
  return request({
    url: '/business/contractInfo/list',
    method: 'get',
    params: query
  })
}

// 查询合同台账详细
export function getContractInfo(contractId) {
  return request({
    url: '/business/contractInfo/' + contractId,
    method: 'get'
  })
}

// 新增合同台账
export function addContractInfo(data) {
  return request({
    url: '/business/contractInfo',
    method: 'post',
    data: data
  })
}

// 修改合同台账
export function updateContractInfo(data) {
  return request({
    url: '/business/contractInfo',
    method: 'put',
    data: data
  })
}

// 删除合同台账
export function delContractInfo(contractId) {
  return request({
    url: '/business/contractInfo/' + contractId,
    method: 'delete'
  })
}

// 查询合同台账列表
export function listContractAll(query) {
  return request({
    url: '/business/contractInfo/listSelect',
    method: 'get',
    params: query
  })
}

// 合同上传识别
export function contractUpload(data) {
  return request2({
    url: '/business/contractInfo/splitPdfToBase64',
    method: 'post',
    data
  })
}
